package com.it.util;

import lombok.Getter;

/**
 * 枚举结果代码
 *
 * @author 16272
 * @date 2023/07/12
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(500, "服务器异常"),
    DATA_ERROR(204, "数据异常"),
    PARAMETER_ERROR(403,"用户名或密码错误"),
    LOGIN_AUTH(208, "凭证失效"),
    UNREGISTERED(209, "用户未注册"),
    REGISTERED(209, "用户名已存在"),
    PERMISSION(209, "没有权限")
    ;
    private final Integer code;
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
